<?php
	$s = new SaeStorage();
	
	$name = $_FILES['myfile']['name'];
	$resName = $_FILES['myfile']['tmp_name'];
	$size = $_FILES['myfile']['size']/1024/1024;
	
	if( $size > 5 )
	{
		echo "文件不得超过5M~";
	}
	else
	{
		$url = $s->upload('sdcard',$name,$resName);
		if( !$url )
			echo "文件上传失败，请重试！";
		else
			echo "<p>上传成功，下载地址为：</p><a href='".$url."'>".$url."</a><br>";
	}
?>